#include "StdAfx.h"
#include "MentorPartType.h"


MentorPartType::MentorPartType(void)
{
	m_PartType = 0;
	m_decalNums = 0;
	m_pinNums = 0;

}


MentorPartType::~MentorPartType(void)
{

}


void MentorPartType::SetPartTypeName( string &name )
{
	m_strPartTypeName = name;
}


void MentorPartType::SetLogicFamilyType( string &type )
{
	m_strLogicFamilyType = type;
}

void MentorPartType::SetPartType( int type )
{
	m_PartType = type;
}

void MentorPartType::SetDecalNumber( int num )
{
	m_decalNums = num;
}

void MentorPartType::SetPinNumber( int num )
{
	m_pinNums = num;
}

void MentorPartType::AddDecal(string &decal)
{
	if( !decal.empty() )
	{
		m_vecDecals.push_back(decal);
	}
}

string MentorPartType::GetDecalByIndex(int index)
{
	string decal;
	if( index>=0&&index<m_vecDecals.size() )
	{
		decal = m_vecDecals.at(index);
	}
	return decal;
}

void MentorPartType::AddPinInfo(PinInfo info)
{
	m_vecPins.push_back(info);
}

PinInfo MentorPartType::GetPinInfoByIndex(int index)
{

	return m_vecPins.at(index);

}